
#include "common.h"

bool CRGraph::hasAdjacents(shared_ptr<CRVertex> vertex) const {
	return myEdges.count(vertex) > 0;
}

size_t CRGraph::addVertex(shared_ptr<CRVertex> vertex) {
	size_t index = myVertices.size();
	myVertices.push_back(vertex);
	return index;
}

void CRGraph::addAdjacentVertex(shared_ptr<CRVertex> vertex, CRAdjacentVertex adjacent) {
	myEdges[vertex].push_back(adjacent);
}
